package com.core.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.mapper.StockMapper;
import com.core.pojo.StockDo;
import com.core.service.StockService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author SunChangSheng
 * @apiNote
 * @since 2021/8/18 18:48
 */
@Service
public class StockServiceImpl extends ServiceImpl<StockMapper, StockDo> implements StockService {
    @Resource
    private StockMapper stockMapper;

    @Override
    public int reduceStock() {
        return stockMapper.reduceStock(1);
    }
}
